﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ershou.BLL;

public partial class zc : System.Web.UI.Page
{
    yh customerSrv = new yh();
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            if (customerSrv.IsNameExist(TextBox1.Text.Trim()))
            {
                Label7.Text = "用户名已存在！";
            }
            else
            {
                customerSrv.Insert(TextBox1.Text.Trim(), TextBox2.Text.Trim(), TextBox4.Text.Trim());
                Response.Redirect("dl.aspx?name=" + TextBox1.Text);
            }
        }
    }
}